# -*- coding: utf-8 -*-
"""
@Time    : 2021/10/12 8:47
@Author  : Leibuyun
@File    : 1.20 合并多个字典或映射.py
"""

# 先在字典a中找，如果找不到再在b中找
from collections import ChainMap

a = {'x': 1, 'z': 33}
b = {'y': 2, 'z': 44}

c = ChainMap(a, b)
print(c['x'], c['y'], c['z'])